/*
 * @Description:
 * @Author: xunzhaotech
 * @Email: luyb@xunzhaotech.com
 * @QQ: 1525572900
 * @Date: 2025-03-24 14:27:39
 * @LastEditTime: 2025-03-24 15:35:47
 * @LastEditors: xunzhaotech
 */
import request from '@/config/axios'

// ERP 财务报表 VO
export interface FinanceStatementVO {
  id: number // 编号
  costRecordDate: Date // 日期
  receiptOrderCount: number // 应收订单数
  receiptAmount: number // 应收金额，单位：元
  receiptDiscountAmount: number // 应收优惠金额，单位：元
  actualReceiptAmount: number // 实收金额，单位：元
  paymentOrderCount: number // 应付订单数
  paymentAmount: number // 应付金额，单位：元
  paymentDiscountAmount: number // 应付优惠金额，单位：元
  actualPaymentAmount: number // 实付金额，单位：元
}

// ERP 财务报表 API
export const FinanceStatementApi = {
  // 查询财务报表分页
  getFinanceStatementBalancePage: async (params: any) => {
    return await request.get({ url: `/erp/finance-statement/balance-page`, params })
  },
  // 查询财务报表分页
  getFinanceStatementPage: async (params: any) => {
    return await request.get({ url: `/erp/finance/statement/page`, params })
  },

  // 导出财务报表 Excel
  exportFinanceStatement: async (params: any) => {
    return await request.download({ url: `/erp/finance/statement/export-excel`, params })
  }
}
